package gui;

import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;

public class Combo02 {

	public static void main(String[] args) {
		final Display display = new Display ();
		Shell shell = new Shell (display);
		shell.setLayout (new FillLayout ());
		Combo combo = new Combo (shell, SWT.NONE);
		combo.add ("item");
		combo.select (0);
		shell.pack ();
		shell.open ();
		int stringLength = combo.getText ().length (); 
		combo.setSelection (new Point (stringLength, stringLength));
		while (!shell.isDisposed ()) {
			if (!display.readAndDispatch ()) display.sleep ();
		}
		display.dispose ();
	}
	}
